'use strict';
module.exports = {
  up: (queryInterface, Sequelize) => {
    return queryInterface.createTable('AppDataCollections', {
      id: {
        type: Sequelize.INTEGER,
        autoIncrement: true,
        primaryKey: true
      },
      dataType: { // type : feedback, subscribe, ...
        allowNull: false,
        type: Sequelize.STRING(20)
      },
      accountName: {
        type: Sequelize.STRING(50)
      },
      email: {
        type: Sequelize.STRING(50)
      },
      content: { // e.g: feedback contents
        type: Sequelize.STRING(1024)
      },
      appVersion: {
        type: Sequelize.STRING
      },
      remark: {
        type: Sequelize.STRING
      },
      status: { // e.g: 0=todo,1=done, for feedback type, '0': waiting for forwarding to business team. '1': has done.
        type: Sequelize.STRING(10)
      },
      createdAt: {
        type: Sequelize.DATE
      },
      updatedAt: {
        type: Sequelize.DATE
      }
    });
  },
  down: (queryInterface, Sequelize) => {
    return queryInterface.dropTable('AppDataCollections');
  }
};